
#ifndef __LED_H__
#define __LED_H__

#include "led_msp_init.h"

enum led_status {
    LED_OFF = 0,
    LED_ON  = 1,
};

enum led_time {
    ON_TIME  = 50,
    OFF_TIME = 50,
};

struct led_obj_t {
    unsigned int light_time;
    unsigned int off_time;
    unsigned char _state;
    unsigned char state;
    void (* led_cb)(unsigned char state);
};

extern struct led_obj_t red_led;

extern void led_set_state(unsigned char state);
extern void led_controller_cb(unsigned char state);
extern void led_blink_controller_handler(struct led_obj_t * led);

#endif
